﻿using System;
using System.IO;
namespace DelEnpyt
{
    class Program
    {
        static void Main(string[] args)

        {
           string sPath= Console.ReadLine();
            if (Directory.Exists(sPath))
            {
                SancPath(sPath);
            }
         
           
        }

        static void SancPath(string path)
        {
            DirectoryInfo directoryInfo = new DirectoryInfo(path);
            var dirs = directoryInfo.GetDirectories();
            var files = directoryInfo.GetFiles();
            if (dirs.Length==0&&files.Length==0)
            {
                Console.WriteLine(path);
                directoryInfo.Delete();
            }
            if (dirs.Length>0)
            {
                foreach (var item in dirs)
                {
                    SancPath(item.FullName);
                }
            }

        }
    }
}
